<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html >
<%@include file = "/shmged/jsp/com/shlcm/portal/main/head.jsp" %>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>

<%@page import="shmged.com.shlcm.utils.CmIBAHelper"%>
    <%@page import="wt.httpgw.URLFactory,wt.query.QuerySpec,wt.workflow.work.WorkItem,wt.fc.ReferenceFactory,java.util.*"%>
    <%@page import="wt.org.WTPrincipal"%>
    <%@page import="wt.workflow.engine.WfActivity"%>
    <%@page import="wt.fc.Persistable"%>
    <%@page import="wt.doc.WTDocument"%>
<%
//String baseUrl = new URLFactory().getBaseHREF();
//WTUser user = (WTUser)SessionHelper.manager.getPrincipal();
String number = request.getParameter("number");


//String uuid = java.util.UUID.randomUUID().toString();
%>
<body>
<script>
function formatDatebox(value){
	if(value == null||value==""){
		return "";
		}
	var dt;
	if(value instanceof Date){
		dt = value;
		}
	else{
		dt = new Date(value);
		if(isNaN(dt)){
			value = value.replace(/\/Date\((-?\d+)\)\//,'$1');
			dt = new Date();
			dt.setTime(value);
			}
	}
	return dt.format("yyyy-MM-dd");
	 }

$(function(){
	var projectNo = "<%=number%>";
	var lastIndex;
	var costTypeList = [
	                    {costType:'fee001',name:'报销'}, 
	                    {costType:'fee002',name:'借款'},
	                    {costType:'fee003',name:'管理费'},
	                    {costType:'fee004',name:'生产费'}   			
	        			]; 
	$('#'+'<%=uuid%>_tt').datagrid({
		title:'费用明细',
		width:600,
		nowrap: true,
		striped: true,
		showFooter:true,
		queryParams:{projectNo:projectNo},
		url:'<%=baseUrl%>shmged/jsp/com/shlcm/projects/jspSearchProjectFee.jsp',
		columns:[[
//{field:'id',title:'id',width:100},
			{field:'name',title:'名称',width:200},
			{field:'time',title:'时间',width:120},
			{field:'sum',title:'金额',width:100}
			//{field:'people',title:'人员',width:100}
			//{field:'memo',title:'备注',width:100}
			
		]],
		
		
		rownumbers:true,
	
	});
	
});
</script>
<table id="<%=uuid %>_tt"  title="费用明细">
  </table>
</body>
</html>